package cn.lyjuan.payment.third.http.api.exception;

import cn.lyjuan.base.exception.IAppCode;
import cn.lyjuan.base.exception.IAppModuleEnum;
import cn.lyjuan.base.exception.impl.BaseModule;

public enum ApiCode implements IAppCode {
    /**
     * 参数错误
     */
    PARAM_ERR("1001", "param_err")
    /**
     * 应用不存在
     */
    , APP_NOT_FOUND("1001", "app_not_found")

    /**
     * 应用支付配置不存在
     */
    , APP_CHL_NOT_FOUND("1003", "app_chl_not_found")
    /**
     * 交易不存在
     */
    , PAY_TRAN_NOT_FOUND("1004", "pay_tran_not_found")
    /**
     * 签名不匹配
     */
    , APP_SIGN_MISMATCH("1005", "app_sign_mismatch")
    /**
     * 不支持苹果退款
     */
    , NOT_SUPPORT_IAP_REFUND("1006", "not_support_iap_refund")
    //
    ;

    private String code;

    private String msg;

    @Override
    public IAppModuleEnum module() {
        return BaseModule.HTTP_API;
    }

    @Override
    public String code() {
        return this.code;
    }

    @Override
    public String msg() {
        return this.msg;
    }

    ApiCode(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
